package com.item.yxlottery.yxlottery.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;

import com.item.yxlottery.yxlottery.R;
import com.item.yxlottery.yxlottery.base.BaseActivity;
import com.zhy.autolayout.AutoLinearLayout;
import com.zhy.autolayout.AutoRelativeLayout;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by leo on 2017/1/8.
 * 提现
 */

public class WithdrawActivity extends BaseActivity implements View.OnClickListener {


    @Bind(R.id.withdraw_et_money)
    EditText mEtMoney;
    @Bind(R.id.withdraw_ll_money)
    AutoLinearLayout mLlMoney;
    @Bind(R.id.withdraw_tv_allwithdraw)
    TextView mTvAllwithdraw;
    @Bind(R.id.withdraw_ll_bankcount)
    AutoLinearLayout mLlBankcount;
    @Bind(R.id.withdraw_tv_submit)
    TextView mTvSubmit;

    @Override
    protected void setCustomActionBar(ImageButton ibActionbarLeft, TextView tvActionBarTitle, ImageButton ibActionbarRight, AutoRelativeLayout layoutActionbar) {
        ibActionbarLeft.setImageResource(R.drawable.leftarrow);
        ibActionbarLeft.setOnClickListener(this);
        ibActionbarRight.setImageResource(R.drawable.ask);
        ibActionbarRight.setOnClickListener(this);
        tvActionBarTitle.setText("提现");
    }

    @Override
    protected View initView() {
        View view = View.inflate(this, R.layout.activity_withdraw, null);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    protected void initEvent() {

    }

    @Override
    protected void initData() {
        mEtMoney.setText("余额");
        mEtMoney.setSelection(mEtMoney.getText().length());

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.withdraw_tv_allwithdraw, R.id.withdraw_ll_bankcount, R.id.withdraw_tv_submit})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ib_actionbar_left://返回
                finish();
                break;
            case R.id.ib_actionbar_right://右边图标

                break;
            case R.id.withdraw_tv_allwithdraw://全部提现
                mEtMoney.setText("所有余额");
                mEtMoney.setSelection(mEtMoney.getText().length());
                break;
            case R.id.withdraw_ll_bankcount://选择银行帐号

                break;
            case R.id.withdraw_tv_submit://提交

                break;
        }
    }
}
